import Vue from 'vue';
import Router from 'vue-router';

Vue.use (Router);

export default new Router ({
  routes: [
    {
      path: '/',
      redirect: '/login',
    },
    {
      path: '/login',
      name: 'login',
      component: () => import ('views/frame/Login.vue'),
    },
    {
      path: '/home',
      name: 'home',
      component: () => import ('views/frame/Home.vue'),
      children: [
        {
          path: '/writecard',
          name: 'writecard',
          component: () => import ('views/card/writecard.vue'),
        },
        {
          path: '/writelog',
          name: 'writelog',
          component: () => import ('views/card/writelog_list.vue'),
        },
        {
          path: '/imsidetail',
          name: 'imsidetail',
          component: () => import ('views/card/imsidetail.vue'),
        },
        {
          path: '/wuIMSIDetail',
          name: 'wuIMSIDetail',
          component: () => import ('views/card/wuIMSIDetail.vue'),
        },
        {
          path: '/blanckcardmonitor',
          name: 'blanckcardmonitor',
          component: () => import ('views/card/blankcardmonitor.vue'),
        },
        {
          path: '/cardface',
          name: 'cardface',
          component: () => import ('views/card/bdm/cardface_list.vue'),
        },
        {
          path: '/dllversion',
          name: 'dllversion',
          component: () => import ('views/card/bdm/dllversion_list.vue'),
        },
        {
          path: '/sp',
          name: 'sp',
          component: () => import ('views/card/bdm/sp_list.vue'),
        },
        {
          path: '/cardspecies',
          name: 'cardspecies',
          component: () => import ('views/card/bdm/cardspecies_list.vue'),
        },
        {
          path: '/smscenter',
          name: 'smscenter',
          component: () => import ('views/card/bdm/smscenter_list.vue'),
        },
        {
          path: '/applybatch',
          name: 'applybatch',
          component: () => import ('views/card/mcm/applybatch_list.vue'),
        },
        {
          path: '/wuCardApply',
          name: 'wuCardApply',
          component: () => import ('views/card/mcm/wuCardApply_list.vue'),
        },
        {
          path: '/filedownload',
          name: 'filedownload',
          component: () => import ('views/card/mcm/filedownload_list.vue'),
        },
        {
          path: '/formatfile',
          name: 'formatfile',
          component: () => import ('views/card/mcm/formatfile.vue'),
        },
        {
          path: '/realtimeopera',
          name: 'realtimeopera',
          component: () => import ('views/card/mcm/realtimeopera.vue'),
        },
        {
          path: '/updatePassword',
          name: 'updatePassword',
          component: () => import ('views/frame/UpdatePassword.vue'),
        },
        {
          path: '/dashboard',
          name: 'dashboard',
          component: () => import ('views/frame/dashboard.vue'),
        },
        // 用户权限
        {
          path: '/amsmodelList',
          name: 'amsmodelList',
          component: () => import ('views/uim/ams/amsmodel_list.vue'), //模块管理
        },
        {
          path: '/amsroleList',
          name: 'amsroleList',
          component: () => import ('views/uim/ams/amsrole_list.vue'), //角色管理
        },
        {
          path: '/amsroleDetail',
          name: 'amsroleDetail',
          component: () => import ('views/uim/ams/amsrole_upd.vue'), //角色管理详情页
        },
        {
          path: '/amsuserList',
          name: 'amsuserList',
          component: () => import ('views/uim/ams/amsuser_list.vue'), //用戶管理
        },
        {
          path: '/amsuserDetail',
          name: 'amsuserDetail',
          component: () => import ('views/uim/ams/amsuser_upd.vue'), //用戶管理详情页
        },
        {
          path: '/amsuserSelf',
          name: 'amsuserSelf',
          component: () => import ('views/uim/ams/amsuser_self.vue'), //个人信息
        },
        //=========TSM 综合类========================
        {
          path: '/ctrlparamsList',
          name: 'ctrlparamsList',
          component: () => import ('views/tsm/sys/ctrlparams_list.vue'),
        }, //预警设置 
      ],
    },
    {
      path: '/404',
      component: resolve => require (['components/page/404.vue'], resolve),
    },
    {
      path: '*',
      redirect: '/404',
    },
  ],
});
